#include<algorithm>
#include<iostream>
#include<vector>
#include<string>
#include<cstdio>
using namespace std;
int Search(int s, int e, int val, vector<int>&arr)
{
	while (s <= e)
	{
		int mid = (s + e) / 2;
		if (arr[mid] < val)
			s = mid + 1;
		else if (arr[mid] > val)
			e = mid - 1;
		else return mid;
	}
	return -2;
}
int main()
{
	int n,k;
	while (~scanf("%d%d",&n,&k))
	{
		vector<int>arr(n);
		for (int i = 0; i < n; i++)
			scanf("%d", &arr[i]);
		printf("%d\n",Search(0, n - 1, k, arr)+1);
	}
	return 0;
}
